<!DOCTYPE html>
<html>
<head>
    
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    
        <script>
            L_NO_TOUCH = false;
            L_DISABLE_3D = false;
        </script>
    
    <style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>
    <style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>
    <script src="https://cdn.jsdelivr.net/npm/leaflet@1.9.3/dist/leaflet.js"></script>
    <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.9.3/dist/leaflet.css"/>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css"/>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.2.0/css/all.min.css"/>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>
    
            <meta name="viewport" content="width=device-width,
                initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
            <style>
                #map_44b068fc9ba3a93138f1da0aed996e59 {
                    position: relative;
                    width: 100.0%;
                    height: 100.0%;
                    left: 0.0%;
                    top: 0.0%;
                }
                .leaflet-container { font-size: 1rem; }
            </style>
        
</head>
<body>
    
    
            <div class="folium-map" id="map_44b068fc9ba3a93138f1da0aed996e59" ></div>
        

        <script>
            // 全局变量，用于保存 Leaflet 地图对象
            var globalMap;

            // 监听 DOM 加载完成事件
            document.addEventListener('DOMContentLoaded', function() {
                // 每隔 100 毫秒检查 Leaflet 地图是否加载完成
                var checkLeaflet = setInterval(function() {
                    // 过滤出所有 Leaflet 地图对象
                    var maps = Object.values(window).filter(function(value) {
                        return value && value._initHooksCalled && value.getContainer;
                    });

                    // 如果找到地图对象，则清除定时器并绑定事件
                    if (maps.length > 0) {
                        clearInterval(checkLeaflet);
                        globalMap = maps[0];

                        // 修改瓦片加载行为，处理所有缩放级别
                        globalMap.eachLayer(function(layer) {
                            if (layer instanceof L.TileLayer) {
                                layer.createTile = function(coords, done) {
                                    var tile = document.createElement('img');
                                    tile.onerror = L.bind(this._tileOnError, this, done, tile);
                                    tile.crossOrigin = '';

                                    var originalZ = coords.z;
                                    if (originalZ > 19) {
                                        coords.z = 18;
                                        var scaleFactor = Math.pow(2, originalZ - 18);
                                        tile.style.transform = 'scale(' + scaleFactor + ')';
                                        tile.style.transformOrigin = '0 0';
                                    } else {
                                        // 对于小于等于 19 级的缩放，正常加载瓦片
                                        coords.z = originalZ;
                                        tile.style.transform = 'scale(1)';
                                    }

                                    var url = this.getTileUrl(coords);
                                    tile.src = url;

                                    return tile;
                                };
                            }
                        });
                    }
                }, 100);
            });
        </script>
        </body>
        
<script>
    
    
            var map_44b068fc9ba3a93138f1da0aed996e59 = L.map(
                "map_44b068fc9ba3a93138f1da0aed996e59",
                {
                    center: [30.01, 120.01],
                    crs: L.CRS.EPSG3857,
                    ...{
  "zoom": 12,
  "zoomControl": true,
  "preferCanvas": false,
}

                }
            );
            L.control.scale().addTo(map_44b068fc9ba3a93138f1da0aed996e59);

            

        
    
            var tile_layer_fccb42dcec8c43b84bac33e00a209bb0 = L.tileLayer(
                "http://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn\u0026size=1\u0026scale=1\u0026style=8\u0026x={x}\u0026y={y}\u0026z={z}",
                {
  "minZoom": 0,
  "maxZoom": 19,
  "maxNativeZoom": 19,
  "noWrap": false,
  "attribution": "\u9ad8\u5fb7\u5730\u56fe",
  "subdomains": "1234",
  "detectRetina": false,
  "tms": false,
  "opacity": 1,
}

            );
        
    
            tile_layer_fccb42dcec8c43b84bac33e00a209bb0.addTo(map_44b068fc9ba3a93138f1da0aed996e59);
        
    
            var layer_control_f73ea97e1372296694ac171044c3b405_layers = {
                base_layers : {
                    "\u9ad8\u5fb7\u666e\u901a\u5730\u56fe" : tile_layer_fccb42dcec8c43b84bac33e00a209bb0,
                },
                overlays :  {
                },
            };
            let layer_control_f73ea97e1372296694ac171044c3b405 = L.control.layers(
                layer_control_f73ea97e1372296694ac171044c3b405_layers.base_layers,
                layer_control_f73ea97e1372296694ac171044c3b405_layers.overlays,
                {
  "position": "topright",
  "collapsed": true,
  "autoZIndex": true,
}
            ).addTo(map_44b068fc9ba3a93138f1da0aed996e59);

        
</script>
</html>